package com.design.model;

/**
 * def
 *
 * @author lw
 * @date 2023/12/4 15:09
 **/
public class SubtractExpression implements Expression{

    private Expression leftOperand;
    private Expression rightOperand;

    public SubtractExpression(Expression leftOperand, Expression rightOperand) {
        this.leftOperand = leftOperand;
        this.rightOperand = rightOperand;
    }

    @Override
    public int interpret() {
        return leftOperand.interpret() - rightOperand.interpret();
    }
}
